package com.borball.store.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;

import com.borball.store.domain.ProductAmount;

public class MaterailStoreDAOTest {

	@Test
	public void testFindSumAmount() {
		try {
			OrderItemDAO dao = new OrderItemDAO();
			Map map = new HashMap();
			map.put("start", "2011-07-20");
			map.put("end", "2011-07-31");
			List<ProductAmount> list = dao.orderByAmount(map);

			System.out.println(list.size());
			for (ProductAmount productAmount : list) {
				System.out.println(productAmount.getName() + ":" + productAmount.getAmount());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
